import 'package:flutter_demo/pages/home.dart';
import 'package:flutter_demo/routes.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // 初始化路由
    final router = FluroRouter();
    Routes.configureRoutes(router);
    return MaterialApp(
      title: 'demos',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const HomePage(),
      onGenerateRoute: router.generator,
      // routes: ,
    );
  }
}
